//
//  TLAniWindow.m
//  FunnyVideo
//
//  Created by 李鑫 on 15/10/12.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//

#import "TLAniWindow.h"
#import "UIImageView+PlayGIF.h"

@interface TLAniWindow ()
@property (nonatomic, strong) NSString    *gifFilePath;
@property (nonatomic, strong) UIImageView *gifImageView;
@end

@implementation TLAniWindow

//initlzation
- (id)initWithFrame:(CGRect)frame gifFilePath:(NSString *)path{
    self = [super initWithFrame:frame];
    
    if(self)
    {
        self.gifFilePath = path;
        
        self.gifImageView = [[UIImageView alloc] initWithFrame:frame];
        
        [self addSubview:self.gifImageView];
    }
    
    return self;
}

//animation start
- (void)startAnimation{
    [self.gifImageView startGIF];
}

//animation reset
- (void)stopAnimation{
    [self.gifImageView stopGIF];
}

@end
